package com.greak.netty_stude.module;

import com.greak.netty_stude.pb.ClusterMessage;
import com.greak.netty_stude.pb.PFMessage;
import com.greak.netty_stude.proto.ProtobufMessage;
import lombok.Builder;
import lombok.Data;

import java.util.List;
import java.util.Map;

/**
 * Created on 2019/5/14.
 *
 * @author hy
 * @since 1.0
 */
@Data
@Builder
@ProtobufMessage
public class User {

    private String name;

    private String address;

    private int age;

    private UserEnum userEnum; //枚举

    private PFMessage message; //对象

    private List<Integer> activitys; //集合

    public User(String name, String address, int age, UserEnum userEnum, PFMessage message, List<Integer> activitys) {
        this.name = name;
        this.address = address;
        this.age = age;
        this.userEnum = userEnum;
        this.message = message;
        this.activitys = activitys;
    }

    @Override
    public String toString() {
        return "User{" +
                "name='" + name + '\'' +
                ", address='" + address + '\'' +
                ", age=" + age +
                ", userEnum=" + userEnum +
                ", message=" + message +
                ", activitys=" + activitys +
                '}';
    }
}
